#!/usr/bin/env bash

mvn clean package  -DskipTests -P prod
cd etung-iot-demo/target
jar -xf *.jar
mkdir app
mv BOOT-INF/lib app/lib
mv META-INF app/META-INF
mv BOOT-INF/classes/* app

cd -

version=0.0.1
DOCKER_BUILDKIT=1 docker build -f Dockerfile -t 1.117.96.113:1180/java/iot-demo:${version} .
docker push 1.117.96.113:1180/java/iot-demo:${version}
